<script type="text/javascript">
	function tab(tab) {
		document.getElementById('tab1_diem').style.display = 'none';
		document.getElementById('tab2_diem').style.display = 'none';
		document.getElementById('tab3_diem').style.display = 'none';
		document.getElementById('tab4_diem').style.display = 'none';
		document.getElementById('tab5_diem').style.display = 'none';

		document.getElementById('li_tab1_diem').setAttribute("class", "");
		document.getElementById('li_tab2_diem').setAttribute("class", "");
		document.getElementById('li_tab3_diem').setAttribute("class", "");
		document.getElementById('li_tab4_diem').setAttribute("class", "");
		document.getElementById('li_tab5_diem').setAttribute("class", "");

		
		
		document.getElementById(tab).style.display = 'block';
		document.getElementById('li_'+tab).setAttribute("class", "tab_active");
	}
	
</script>
<?php


$form = $this->form;
$form->setAttribute('action', $this->url('tienich', array('action' => 'index')));
$form->prepare();

echo $this->form()->openTag($form) . PHP_EOL;

echo $this->formRow($form->get('mahs')) . PHP_EOL;
echo $this->formRow($form->get('namhoc')) . PHP_EOL;
echo $this->formRow($form->get('hocki')) . PHP_EOL;


echo "<br>".$this->formInput($form->get('submit')) . PHP_EOL;
echo $this->form()->closeTag($form) . PHP_EOL;


?>
<div id="error" class="error"><?php echo $this->error; ?></div>




<?php if(isset($bangdiem_m) || isset($bangdiem_15p) || isset($bangdiem_1t) || isset($bangdiem_kt) || isset($bangdiem_tb)){ ?>
<table class="table">
<?php foreach ($thongtin as $tt) : ?>
	<tr>
    	<td>
            <a>Họ tên: <strong><?php echo $this->escapeHtml($tt->tenhs); ?></strong> </a>
        </td>
        <td>
            <a>Ngày sinh: <strong><?php echo $this->escapeHtml($tt->ngaysinh); ?> </strong></a>
        </td>
        <td>
            <a>Giới tính: <strong><?php echo $this->escapeHtml($tt->gioitinh); ?> </strong></a>
        </td>
        <td>
            <a>Lớp: <strong><?php echo $this->escapeHtml($tt->tenlop); ?></strong> </a>
        </td>
    </tr>
    <?php endforeach; ?>
    <tr>
    	<td></td>
        <td></td>
    	<td>Học kì: <strong><?php echo $this->escapeHtml($this->hocki); ?></strong></td>
        <td>Năm học: <strong><?php echo $this->escapeHtml($this->namhoc); ?></strong></td>
    </tr>
</table>
<div id="tabs_diem">
    <ul>
        <li id="li_tab1_diem" onclick="tab('tab1_diem')" class="tab_active"><a>Miệng</a></li>
        <li id="li_tab2_diem" onclick="tab('tab2_diem')" class=""><a>15 phút</a></li>
        <li id="li_tab3_diem" onclick="tab('tab3_diem')" class=""><a>1 tiết</a></li>
        <li id="li_tab4_diem" onclick="tab('tab4_diem')" class=""><a>Kiểm tra HK</a></li>
        <li id="li_tab5_diem" onclick="tab('tab5_diem')" class=""><a>Trung bình HK</a></li>
    </ul>
    <div id="content_area_diem">
    	<div id="tab1_diem">
            <table class="table">
                
                <tr>
                    
                    
                    <th>
                        <a>Môn học </a>
                    </th>
                    <th>
                        <a>Số điểm </a>
                    </th>
                       
                    
                </tr>
                <?php foreach ($bangdiem_m as $bangdiem_m) : ?>
                    <tr id="<?php echo $bangdiem_m->id ?>">
                        
                        <td><?php echo $this->escapeHtml($bangdiem_m->tenmonhoc); ?></td>
                        <td><?php echo $this->escapeHtml($bangdiem_m->sodiem); ?></td>
                        
                        
                    </tr>
                <?php endforeach; ?>
            </table>
          </div>
          <div id="tab2_diem" style="display: none;">
            <table class="table">
                
                <tr>
                    
                    
                    <th>
                        <a>Môn học </a>
                    </th>
                    <th>
                        <a>Số điểm </a>
                    </th>
                       
                    
                </tr>
                <?php foreach ($bangdiem_15p as $bangdiem_15p) : ?>
                    <tr id="<?php echo $bangdiem_15p->id ?>">
                        
                        <td><?php echo $this->escapeHtml($bangdiem_15p->tenmonhoc); ?></td>
                        <td><?php echo $this->escapeHtml($bangdiem_15p->sodiem); ?></td>
                        
                        
                    </tr>
                <?php endforeach; ?>
            </table>
          </div>
          <div id="tab3_diem" style="display: none;">
            <table class="table">
                
                <tr>
                    
                    
                    <th>
                        <a>Môn học </a>
                    </th>
                    <th>
                        <a>Số điểm </a>
                    </th>
                       
                    
                </tr>
                <?php foreach ($bangdiem_1t as $bangdiem_1t) : ?>
                    <tr id="<?php echo $bangdiem_1t->id ?>">
                        
                        <td><?php echo $this->escapeHtml($bangdiem_1t->tenmonhoc); ?></td>
                        <td><?php echo $this->escapeHtml($bangdiem_1t->sodiem); ?></td>
                        
                        
                    </tr>
                <?php endforeach; ?>
            </table>
          </div>
          <div id="tab4_diem" style="display: none;">
            <table class="table">
                
                <tr>
                    
                    
                    <th>
                        <a>Môn học </a>
                    </th>
                    <th>
                        <a>Số điểm </a>
                    </th>
                       
                    
                </tr>
                <?php foreach ($bangdiem_kt as $bangdiem_kt) : ?>
                    <tr id="<?php echo $bangdiem_kt->id ?>">
                        
                        <td><?php echo $this->escapeHtml($bangdiem_kt->tenmonhoc); ?></td>
                        <td><?php echo $this->escapeHtml($bangdiem_kt->sodiem); ?></td>
                        
                        
                    </tr>
                <?php endforeach; ?>
            </table>
          </div>
          <div id="tab5_diem" style="display: none;">
            <table class="table">
                
                <tr>
                    
                    
                    <th>
                        <a>Môn học </a>
                    </th>
                    <th>
                        <a>Số điểm </a>
                    </th>
                       
                    
                </tr>
                <?php foreach ($bangdiem_tb as $bangdiem_tb) : ?>
                    <tr id="<?php echo $bangdiem_tb->id ?>">
                        
                        <td><?php echo $this->escapeHtml($bangdiem_tb->tenmonhoc); ?></td>
                        <td><?php echo $this->escapeHtml($bangdiem_tb->sodiem); ?></td>
                        
                        
                    </tr>
                <?php endforeach; ?>
            </table>
          </div>
    </div>
</div>
<?php } ?>